import uuid
from django.db import models
from ..userprofile.models import UserProfile


class Friends(models.Model):
    """
    好友表
    """
    f_type = [
        ('1', '普通好友'),
        ('2', '新标好友'),
        ('3', '黑名单'),
    ]

    id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
    user_id = models.ForeignKey(to=UserProfile, related_name="user",
                                on_delete=models.DO_NOTHING, verbose_name="某一用户id")
    friends_id = models.ForeignKey(to=UserProfile, related_name="friends",
                                   on_delete=models.DO_NOTHING, verbose_name="用户所对应朋友的id")
    friends_type = models.SmallIntegerField(choices=f_type, verbose_name='朋友类型')
    create_time = models.DateTimeField(auto_now_add=True, verbose_name='加好友时间')
